package com.xuanrui.commons.enums;

/**
 * @author afeng
 * @version 1.0
 * @date 2023/3/1 下午3:53
 */
public enum FhTableEndModeTypeEnum {
    OWNER_DISSOLVE(2, "房主解散"),
    NORMAL_END(3, "正常结束"),
    APPLY_DISSOLVE(4, "申请解散"),
    BREAK_DISSOLVE(5, "断线解散"),
    SYSTEM_DISSOLVE(6, "系统解散"),
    ;

    private int type;
    private String desc;

    FhTableEndModeTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static String getEndModeTypeDesc(int type) {

        for (FhTableEndModeTypeEnum var : FhTableEndModeTypeEnum.values()) {
            if (type == var.getType())
                return var.getDesc();
        }
        return "房主解散";
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
